knowledge: bats/bash-3.2 assertion trap + 4 orchestration/guard edges; 5 duplicates retired - #47
knowledge: bats/bash-3.2 assertion trap + 4 orchestration/guard edges; 5 duplicates retired#47choiyounggi wants to merge 1 commit into
Conversation
|
Follow-up flush (2026-08-06) found two queued candidates that overlap this PR. Recording the outcome here instead of opening a competing PR, since both target tables this branch already edits. 1. 2.
Field evidence 2026-08-06 (dev-loop orchestrate over Orca, three measurements in one run): an i43 implement dispatch bound to a busy terminal went |
Knowledge flush — 11 insight(s)
Drained 9 queue files (11 candidate rows) from
~/.dev-loop/queue/. 5 candidateswere exact duplicates of knowledge already ingested by the #42–#46 consolidation
and were retired without edits; 6 were merged into existing pages (merge-before-create
— no new pages, no new categories). Open-PR dedup check:
gh pr list --label dev-loop:knowledge --state openreturned zero open PRs, so nothing here overlapsan in-flight review.
Verified best-practice
1. Bats assertions as
[[ ]]mid-test are decoration on bash 3.2 →verified.Claim: under bats on macOS system bash (3.2.57), a false
[[ ]]that is not thetest's last command does not fail the test;
[ ]andgrep -qFpipelines fail atany position. Verified this session by fresh local reproduction (Bats 1.14.0, GNU
bash 3.2.57, arm64): 4-test probe file gave
okfor mid-test false[[ ]],not okfor mid-test[ ], mid-test grep, and last-line[[ ]]. Mechanismisolated outside bats:
bash -ec '[[ … ]]; echo survived'exits 0 while the[ ]form aborts — a pre-4.0 errexit semantic, not a bats defect. Sources:
https://tiswww.case.edu/php/chet/bash/COMPAT (bash-4.0 changed
set -eto exit oncompound-command failure), https://bats-core.readthedocs.io/en/stable/gotchas.html
and https://www.shellcheck.net/wiki/SC2314 (the documented same-shape gotcha for
negated
!commands: they "can never fail when used in the middle of a test").2. Widened scan surface turning old tests red → triage as first true positive →
field-tested.Claim: when a leak/masking detector gains a previously unscanned output channel and
an existing test reddens, diff what the new surface saw against what the fixture
declares, and fix the fixture's smuggled data rather than the detector. Evidence is
the session reproduction (linkly #43:
result.bindingswidening reddenedtest_when_guard_removed_diverges; fixture carried an undeclaredpasswordkey;narrowing to declared fields → 1218 green). No independent external source claims
this exact triage order, so it stays field-tested; it is consistent with the page's
existing sourced principle (change-detector tests / "the guard reddens on a genuine
S-and-C artifact means the guard is working").
3. Worker usage-limit pause looks alive → check pane tail for the limit marker →
field-tested.Claim: simultaneous quiet workers with green liveness are a usage-limit pause;
find the
You've hit your session limit · resets HH:MMmarker, then after resetsend a resume prompt ordering state-recheck → remaining DoD → completion signal.
Evidence: 2026-08-06 run, three workers paused on one reset with identical markers;
the structured resume prompt recovered all three at their exact interruption point.
Vendor docs do not document the marker string, so no external citation is possible —
kept field-tested with the context described on the page.
4. Dispatch after
worker_doneneeds a substrate-idle wait; a failed dispatch consumes the task →field-tested.Evidence: reproduced twice in the 2026-08-06 run (immediate dispatch →
runtime_unavailable+ task consumed; dispatch afterorca terminal wait --for tui-idlesucceeded first try). Orca is an internal tool; no external source exists.5. Guardrail
worktree_escapecan escalate on read-only cross-worktree access →field-tested.Evidence: two read-only commands (
awk/grepover an upstream FINDINGS file,git status) each raisedaskand stopped the watch with exit 5; both approvedafter review. This conflicts with the existing page's 1.0.0 reproduction where
reads passed — handled as a condition-dependent (rule-version) edge case, not an
overwrite (see below).
6.
sh "$SCRIPT"stub seam under EDR — second reproduction → enriches existingfield-testedrow.Directive already on the page from the #42–#43 reconciliation; this flush adds the
independent second reproduction (8 stall-handler stubs injected without any
chmod, bats suite 331/331 green under SentinelOne).Dropped as exact duplicates (no edit, retired from queue): gate quoting-form
parsing (already
command-text-inspected-before-executionstep 8 + Instead-of rowcapture incl. redirection order (already the whole of
tool-diagnostics-without-a-failing-exit-code), Homebrew clang-isysroot $(xcrun --show-sdk-path)(already the whole ofcompiler-sysroot-on-macos, incl.the same 69-failure repro), temp-artifact prefix counting + AST-rule enforcement +
RED-first guard (already
artifact-leakage-from-a-suitesteps 1/4/5), andvacuously-green pre-implementation usage-error test proven by guard mutation
(already a
checks-that-cannot-passedge row describing the identicalunknown-subcommand/exit-1 case).
Existing-layer check
Read before deciding: root
INDEX.md; domain indexes for testing, platforms,infrastructure; and the nine candidate-overlapping pages
(
command-text-inspected-before-execution,tool-diagnostics-without-a-failing-exit-code,compiler-sysroot-on-macos,artifact-leakage-from-a-suite,worktree-isolated-workers,tests-that-cannot-fail,checks-that-cannot-pass,guard-shape-vs-consequence,control-signals-vs-primary-artifacts,permissions-and-exec-bits,destructive-operations-on-shared-daemons).and evidence on existing pages. No new page, no new category.
worktree-isolated-workersstates reads pass the guardrail (1.0.0 repro); thenew observation shows a rule version escalating on reads. Added as an edge row
("guardrail rules differ by version — probe one read before fanning out") and
noted in the log entry; the Do-this table was not overwritten.
trigger-for-trigger and directive-for-directive (the knowledge: gate-author quoting, sh-invoked stubs, stderr-warning hooks, vacuous-green tests, temp-leak attribution, throttled auth calls #42–feat(knowledge): flush pipeline hardening — open-PR dedup, checkable evidence, harvest backstop #46 reconciliation had
already ingested earlier harvests of the same sessions' insights).
the pages the new rows reference (e.g.
tests-that-cannot-fail↔checks-that-cannot-pass,control-signals↔worktree-isolated-workersviathe agent-orchestration index).
Routing decision
[[ ]]testing/quality/tests-that-cannot-fail— new never-fails-pattern row + sourcestesting/quality/guard-shape-vs-consequence— When-this-applies clause + edge row + field evidenceinfrastructure/agent-orchestration/control-signals-vs-primary-artifacts— edge row + field evidenceinfrastructure/agent-orchestration/worktree-isolated-workers— edge row (condition-dependent conflict)platforms/filesystems/permissions-and-exec-bits— evidence sentenceDomain hints from the queue were respected except where a page already owned the
case: the "testing"-hinted EDR-stub insight routes to platforms (the page that owns
exec-bit/EDR invocation style), and the "platforms"-hinted orchestration insights
route to infrastructure/agent-orchestration (dedicated category), consistent with
prior flushes. Index "load when" lines updated for the four pages whose routing
surface grew.